/******************************************************************

			           							
  * File    : app_device.h
  * By      : luofei
  * Version : V1.0
  * time    : 2013/01/16
********************************************************************/

#ifndef APP_DEVICE_H
#define APP_DEVICE_H

#include "../bsp_data/bsp_queue.h"
#include "../bsp_data/bsp_list.h"




typedef uint16_t (*DEVICE_SEND_CMOT)( void *,unsigned char *,uint16_t );
typedef uint16_t (*DEVICE_SEND_TMOT)( void *);

typedef uint16_t (*DEVICE_SEND_FUC)(  unsigned char *,uint16_t );
typedef struct _app_Device{

	DEVICE_SEND_CMOT       d_create_timer;
	DEVICE_SEND_TMOT       d_deal_timerout;
	DEVICE_SEND_FUC        d_send_fuc;

	//Recv
	cir_queue				c_RecvBuffer;

	//Send
	cir_queue				c_SendBuffer;

	

}appDevice,*p_appDevice;

/*****************************************************                       
*				app_init_AppDevice	
* Description:	
* Arguments  :   
* Returns    : 
******************************************************/
void bsp_init_AppDevice( p_appDevice p_Device,
						 DEVICE_SEND_CMOT p_create,
						 DEVICE_SEND_TMOT p_timerout,
						 DEVICE_SEND_FUC  p_send );


/*****************************************************                       
*				app_set_AppDeviceRecv	
* Description:	
* Arguments  :   
* Returns    : 
******************************************************/
void bsp_set_AppDeviceRecv( p_appDevice p_Device,
						    unsigned char *p_Data,
							unsigned char  u_max,
							unsigned char  u_per );

/*****************************************************                       
*				app_set_AppDeviceSend	
* Description:	
* Arguments  :   
* Returns    : 
******************************************************/
void bsp_set_AppDeviceSend( p_appDevice p_Device,
						    unsigned char *p_Data,
							unsigned char  u_max,
							unsigned char  u_per );
#endif